import { _decorator, Node, Component } from "cc";


const { ccclass, property } = _decorator;

@ccclass
export default class ScrollViewItemBase extends Component {

    public mChildNode: Node[] = [];
    public itemID = -1;

    onLoad() {
        this.SetChildNode();
    }

    public init(index?: number) { }

    //多行多列需要重写函数给mChildNode赋值
    public SetChildNode() {

    }

    /**>1代表是多行多列循环列表 */
    public mChildNums: number = 1;

    // 必须重新的函数
    public updateItem(tmplId, data) {
        //必须赋值,底层列表根据此值计算上下
        this.itemID = tmplId;
        this.node.active = true;
    };
}

